<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Theme Protocol Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Protocol/Theme" class="dashAnchor"></a>
    <a title="Theme Protocol Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">ThemeKit 1.4.0 Docs</a></p>
        <p class="header-right"><a href="https://github.com/luckymarmot/ThemeKit"><img src="../img/gh.png"/>View on GitHub</a></p>
        <p class="header-right"><a href="dash-feed://http%3A%2F%2Fthemekit.nunogrilo.com%2Fdocsets%2FThemeKit.xml"><img src="../img/dash.png"/>Install in Dash</a></p>
        <p class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">ThemeKit Reference</a>
        <img id="carat" src="../img/carat.png" />
        Theme Protocol Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../ThemeKit.html">ThemeKit</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/ThemeManager.html">ThemeManager</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ThemeManager/WindowThemePolicy.html">– WindowThemePolicy</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Notification.html">Notification</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Notification/Name.html">– Name</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Themes.html">Themes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/Theme.html">Theme</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/LightTheme.html">LightTheme</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/DarkTheme.html">DarkTheme</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/SystemTheme.html">SystemTheme</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/UserTheme.html">UserTheme</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Theme%20Assets.html">Theme Assets</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/ThemeColor.html">ThemeColor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ThemeGradient.html">ThemeGradient</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ThemeImage.html">ThemeImage</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/NSWindow.html">NSWindow</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSColor.html">NSColor</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Theme</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">@objc</span><span class="p">(</span><span class="kt">TKTheme</span><span class="p">)</span>
<span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">Theme</span> <span class="p">:</span> <span class="kt">NSObjectProtocol</span></code></pre>

                </div>
              </div>
            <p>Theme protocol: the base of all themes.</p>

<p><em>ThemeKit</em> makes available, without any further coding:</p>

<ul>
<li>a <code><a href="../Classes/LightTheme.html">LightTheme</a></code> (the default macOS theme)</li>
<li>a <code><a href="../Classes/DarkTheme.html">DarkTheme</a></code> (the dark macOS theme, using <code>NSAppearanceNameVibrantDark</code>)</li>
<li>a <code><a href="../Classes/SystemTheme.html">SystemTheme</a></code> (which dynamically resolve to either <code><a href="../Classes/LightTheme.html">LightTheme</a></code> or `DarkTheme 
depending on the macOS preference at <strong>System Preferences &gt; General &gt; Appearance</strong>)</li>
</ul>

<p>You can choose wheter or not to use these, and you can also implement your custom
themes by:</p>

<ul>
<li>implementing native <code>Theme</code> classes conforming to this protocol and <code>NSObject</code></li>
<li>provide user themes (<code><a href="../Classes/UserTheme.html">UserTheme</a></code>) with <code>.theme</code> files</li>
</ul>

<p>Please check the provided <em>Demo.app</em> project for sample implementations of both.</p>

              <div class="slightly-smaller">
                <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L31-L61">Show on GitHub</a>
              </div>
          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Required%20Properties"></a>
                <a name="//apple_ref/swift/Section/Required Properties" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Required%20Properties"></a>
                  <h3 class="section-name"><p>Required Properties</p>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ThemeKit@objc(pl)TKTheme(py)identifier"></a>
                    <a name="//apple_ref/swift/Property/identifier" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ThemeKit@objc(pl)TKTheme(py)identifier">identifier</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Unique theme identifier.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">identifier</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L35">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ThemeKit@objc(pl)TKTheme(py)displayName"></a>
                    <a name="//apple_ref/swift/Property/displayName" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ThemeKit@objc(pl)TKTheme(py)displayName">displayName</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Theme display name.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">displayName</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L38">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ThemeKit@objc(pl)TKTheme(py)shortDisplayName"></a>
                    <a name="//apple_ref/swift/Property/shortDisplayName" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ThemeKit@objc(pl)TKTheme(py)shortDisplayName">shortDisplayName</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Theme short display name.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">shortDisplayName</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L41">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ThemeKit@objc(pl)TKTheme(py)isDarkTheme"></a>
                    <a name="//apple_ref/swift/Property/isDarkTheme" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ThemeKit@objc(pl)TKTheme(py)isDarkTheme">isDarkTheme</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Is this a dark theme?</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">isDarkTheme</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L44">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Optional%20Methods%2FProperties"></a>
                <a name="//apple_ref/swift/Section/Optional Methods/Properties" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Optional%20Methods%2FProperties"></a>
                  <h3 class="section-name"><p>Optional Methods/Properties</p>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackForegroundColor"></a>
                    <a name="//apple_ref/swift/Property/fallbackForegroundColor" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackForegroundColor">fallbackForegroundColor</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Optional: foreground color to be used on when a foreground color is not provided
by the theme.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@objc</span>
<span class="kd">optional</span> <span class="k">var</span> <span class="nv">fallbackForegroundColor</span><span class="p">:</span> <span class="kt">NSColor</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L50">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackBackgroundColor"></a>
                    <a name="//apple_ref/swift/Property/fallbackBackgroundColor" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackBackgroundColor">fallbackBackgroundColor</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Optional: background color to be used on when a background color (a color which
contains <code>Background</code> in its name) is not provided by the theme.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@objc</span>
<span class="kd">optional</span> <span class="k">var</span> <span class="nv">fallbackBackgroundColor</span><span class="p">:</span> <span class="kt">NSColor</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L54">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackGradient"></a>
                    <a name="//apple_ref/swift/Property/fallbackGradient" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackGradient">fallbackGradient</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Optional: gradient to be used on when a gradient is not provided by the theme.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@objc</span>
<span class="kd">optional</span> <span class="k">var</span> <span class="nv">fallbackGradient</span><span class="p">:</span> <span class="kt">NSGradient</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L57">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackImage"></a>
                    <a name="//apple_ref/swift/Property/fallbackImage" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackImage">fallbackImage</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Optional: image to be used on when an image is not provided by the theme.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@objc</span>
<span class="kd">optional</span> <span class="k">var</span> <span class="nv">fallbackImage</span><span class="p">:</span> <span class="kt">NSImage</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L60">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Convenient%20Methods%2FProperties%20%28Swift%20only%29"></a>
                <a name="//apple_ref/swift/Section/Convenient Methods/Properties (Swift only)" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Convenient%20Methods%2FProperties%20%28Swift%20only%29"></a>
                  <h3 class="section-name"><p>Convenient Methods/Properties (Swift only)</p>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE07isLightA0Sbvp"></a>
                    <a name="//apple_ref/swift/Property/isLightTheme" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE07isLightA0Sbvp">isLightTheme</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Is this a light theme?</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="o">!</span><span class="n">aTheme</span><span class="p">.</span><span class="n">isDarkTheme</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">isLightTheme</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L77-L79">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE08isSystemA0Sbvp"></a>
                    <a name="//apple_ref/swift/Property/isSystemTheme" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE08isSystemA0Sbvp">isSystemTheme</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Is this the system theme? If true, theme automatically resolve to
<code><a href="../Classes/ThemeManager.html#/c:@M@ThemeKit@objc(cs)TKThemeManager(cpy)lightTheme">ThemeManager.lightTheme</a></code> or <code><a href="../Classes/ThemeManager.html#/c:@M@ThemeKit@objc(cs)TKThemeManager(cpy)darkTheme">ThemeManager.darkTheme</a></code>, accordingly to
<strong>System Preferences &gt; General &gt; Appearance</strong>.</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="p">[</span><span class="n">aTheme</span><span class="p">.</span><span class="n">identifier</span> <span class="nf">isEqualToString</span><span class="p">:</span><span class="n">TKSystemTheme</span><span class="p">.</span><span class="n">identifier</span><span class="p">]</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">isSystemTheme</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L90-L92">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE06isUserA0Sbvp"></a>
                    <a name="//apple_ref/swift/Property/isUserTheme" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE06isUserA0Sbvp">isUserTheme</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Is this a user theme?</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="p">[</span><span class="n">aTheme</span> <span class="nf">isKindOfClass</span><span class="p">:[</span><span class="n">TKUserTheme</span> <span class="nf">class</span><span class="p">]]</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">isUserTheme</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L101-L103">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE5applyyyF"></a>
                    <a name="//apple_ref/swift/Method/apply()" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE5applyyyF">apply()</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Apply theme (make it the current one).</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="p">[[</span><span class="n">TKThemeManager</span> <span class="nf">sharedManager</span><span class="p">]</span> <span class="nf">setTheme</span><span class="p">:</span><span class="n">aTheme</span><span class="p">]</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">apply</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L112-L114">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE10themeAssetyypSgSSF"></a>
                    <a name="//apple_ref/swift/Method/themeAsset(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE10themeAssetyypSgSSF">themeAsset(_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Theme asset for the specified key. Supported assets are <code>NSColor</code>, <code>NSGradient</code>, <code>NSImage</code> and <code>NSString</code>.</p>

<p>This function is overriden by <code><a href="../Classes/UserTheme.html">UserTheme</a></code>.</p>

<p>This method is not available from Objective-C.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">themeAsset</span><span class="p">(</span><span class="n">_</span> <span class="nv">key</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Any</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>key</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>A color name, gradient name, image name or a theme string</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>The theme value for the specified key.</p>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L125-L140">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE03hasA5AssetySbSSF"></a>
                    <a name="//apple_ref/swift/Method/hasThemeAsset(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE03hasA5AssetySbSSF">hasThemeAsset(_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Checks if a theme asset is provided for the given key.</p>

<p>This function is overriden by <code><a href="../Classes/UserTheme.html">UserTheme</a></code>.</p>

<p>This method is not available from Objective-C.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">hasThemeAsset</span><span class="p">(</span><span class="n">_</span> <span class="nv">key</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>key</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>A color name, gradient name, image name or a theme string</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p><code>true</code> if theme provides an asset for the given key; <code>false</code> otherwise.</p>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L151-L153">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE30defaultFallbackForegroundColorSo7NSColorCvp"></a>
                    <a name="//apple_ref/swift/Property/defaultFallbackForegroundColor" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE30defaultFallbackForegroundColorSo7NSColorCvp">defaultFallbackForegroundColor</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Default foreground color to be used on fallback situations when
no <code><a href="../Protocols/Theme.html#/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackForegroundColor">fallbackForegroundColor</a></code> was specified by the theme.</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="n">aTheme</span><span class="p">.</span><span class="n">isDarkTheme</span> <span class="p">?</span> <span class="n">NSColor</span><span class="p">.</span><span class="n">whiteColor</span> <span class="p">:</span> <span class="n">NSColor</span><span class="p">.</span><span class="n">blackColor</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">defaultFallbackForegroundColor</span><span class="p">:</span> <span class="kt">NSColor</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L163-L165">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE30defaultFallbackBackgroundColorSo7NSColorCvp"></a>
                    <a name="//apple_ref/swift/Property/defaultFallbackBackgroundColor" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE30defaultFallbackBackgroundColorSo7NSColorCvp">defaultFallbackBackgroundColor</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Default background color to be used on fallback situations when
no <code><a href="../Protocols/Theme.html#/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackBackgroundColor">fallbackBackgroundColor</a></code> was specified by the theme (background color
is a color method that contains <code>Background</code> in its name).</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="n">aTheme</span><span class="p">.</span><span class="n">isDarkTheme</span> <span class="p">?</span> <span class="n">NSColor</span><span class="p">.</span><span class="n">blackColor</span> <span class="p">:</span> <span class="n">NSColor</span><span class="p">.</span><span class="n">whiteColor</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">defaultFallbackBackgroundColor</span><span class="p">:</span> <span class="kt">NSColor</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L176-L178">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE23defaultFallbackGradientSo10NSGradientCSgvp"></a>
                    <a name="//apple_ref/swift/Property/defaultFallbackGradient" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE23defaultFallbackGradientSo10NSGradientCSgvp">defaultFallbackGradient</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Default gradient to be used on fallback situations when
no <code><a href="../Protocols/Theme.html#/c:@M@ThemeKit@objc(pl)TKTheme(py)fallbackForegroundColor">fallbackForegroundColor</a></code> was specified by the theme.</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="p">[[</span><span class="n">NSGradient</span> <span class="nf">alloc</span><span class="p">]</span> <span class="nf">initWithStartingColor</span><span class="p">:(</span><span class="n">aTheme</span><span class="p">.</span><span class="n">isDarkTheme</span> <span class="p">?</span> <span class="n">NSColor</span><span class="p">.</span><span class="n">blackColor</span> <span class="p">:</span> <span class="n">NSColor</span><span class="p">.</span><span class="n">whiteColor</span><span class="p">)</span> <span class="nf">endingColor</span><span class="p">:(</span><span class="n">aTheme</span><span class="p">.</span><span class="n">isDarkTheme</span> <span class="p">?</span> <span class="n">NSColor</span><span class="p">.</span><span class="n">whiteColor</span> <span class="p">:</span> <span class="n">NSColor</span><span class="p">.</span><span class="n">blackColor</span><span class="p">)]</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">defaultFallbackGradient</span><span class="p">:</span> <span class="kt">NSGradient</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L188-L190">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE20defaultFallbackImageSo7NSImageCvp"></a>
                    <a name="//apple_ref/swift/Property/defaultFallbackImage" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE20defaultFallbackImageSo7NSImageCvp">defaultFallbackImage</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Default image to be used on fallback situations when
no image was specified by the theme.</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="p">[[</span><span class="n">NSImage</span> <span class="nf">alloc</span><span class="p">]</span> <span class="nf">initWithSize</span><span class="p">:</span><span class="n">NSZeroSize</span><span class="p">]</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">defaultFallbackImage</span><span class="p">:</span> <span class="kt">NSImage</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L200-L202">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE09effectiveA0AaB_pvp"></a>
                    <a name="//apple_ref/swift/Property/effectiveTheme" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE09effectiveA0AaB_pvp">effectiveTheme</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Effective theme, which can be different from itself if it represents the 
system theme, respecting <strong>System Preferences &gt; General &gt; Appearance</strong> 
(in that case it will be either <code><a href="../Classes/ThemeManager.html#/c:@M@ThemeKit@objc(cs)TKThemeManager(cpy)lightTheme">ThemeManager.lightTheme</a></code> or <code><a href="../Classes/ThemeManager.html#/c:@M@ThemeKit@objc(cs)TKThemeManager(cpy)darkTheme">ThemeManager.darkTheme</a></code>).</p>

<p>This method is not available from Objective-C. Alternative code:</p>
<pre class="highlight objective_c"><code><span class="p">[</span><span class="n">aTheme</span><span class="p">.</span><span class="n">identifier</span> <span class="nf">isEqualToString</span><span class="p">:</span><span class="n">TKSystemTheme</span><span class="p">.</span><span class="n">identifier</span><span class="p">]</span> <span class="p">?</span> <span class="p">(</span><span class="n">aTheme</span><span class="p">.</span><span class="n">isDarkTheme</span> <span class="p">?</span> <span class="n">TKThemeManager</span><span class="p">.</span><span class="n">darkTheme</span> <span class="p">:</span> <span class="n">TKThemeManager</span><span class="p">.</span><span class="n">lightTheme</span><span class="p">)</span> <span class="p">:</span> <span class="n">aTheme</span><span class="p">;</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">effectiveTheme</span><span class="p">:</span> <span class="kt">Theme</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L213-L219">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8ThemeKit0A0PAAE16themeDescriptionySSAaB_pF"></a>
                    <a name="//apple_ref/swift/Method/themeDescription(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8ThemeKit0A0PAAE16themeDescriptionySSAaB_pF">themeDescription(_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Theme description.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">themeDescription</span><span class="p">(</span><span class="n">_</span> <span class="nv">theme</span><span class="p">:</span> <span class="kt">Theme</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/luckymarmot/ThemeKit/blob/master/Sources/Theme.swift#L222-L224">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>© 2016-2017 <a class="link" href="https://paw.cloud" target="_blank" rel="external">Paw</a> &amp; <a class="link" href="http://nunogrilo.com" target="_blank" rel="external">Nuno Grilo</a> under <a class="link" href="https://github.com/luckymarmot/ThemeKit/blob/master/LICENSE" target="_blank" rel="external">MIT License</a>.</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.7</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
